﻿#include "effects/extimage.h"

#include "common.h"
#include "texture.h"
#include "shader.h"
#include "context.h"
#include "target.h"
#include <exception>

anip::ImageLoaderEffect::ImageLoaderEffect(string path)
{
	texOutputs = new TextureParameter[1];
	_tex = Texture2D::createFromFile(path);
	texOutputs[0] = { _tex, _tex->width(), _tex->height() };
}

void anip::ImageLoaderEffect::initialize()
{
}

void anip::ImageLoaderEffect::process(const Context& cxt)
{
}

void anip::ImageLoaderEffect::finalize()
{
	_tex->finalize();
	delete _tex;
	delete texOutputs;
}